package com.stlm2.dems.transfer.entity.base;

import com.stlm2.dems.entity.OrderState;

import java.math.BigDecimal;
import java.util.Date;

/**
 * Author：fuchunyu
 * Date：2017/8/4
 * Description：
 */
public class BaseTransfer {
    private Integer id;
    private String code;
    private Integer userId;
    private Integer toUserId;
    private BigDecimal money;
    private Date creatTime;
    private OrderState orderState;
    private Integer childId;

    public Integer getChildId() {
        return childId;
    }

    public void setChildId(Integer childId) {
        this.childId = childId;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public Integer getToUserId() {
        return toUserId;
    }

    public void setToUserId(Integer toUserId) {
        this.toUserId = toUserId;
    }

    public BigDecimal getMoney() {
        return money;
    }

    public void setMoney(BigDecimal money) {
        this.money = money;
    }

    public Date getCreatTime() {
        return creatTime;
    }

    public void setCreatTime(Date creatTime) {
        this.creatTime = creatTime;
    }

    public OrderState getOrderState() {
        return orderState;
    }

    public void setOrderState(OrderState orderState) {
        this.orderState = orderState;
    }

    /**
     * 订单状态
     * @return
     */
    public Integer getOrderStateValue(){
        return (orderState != null) ? orderState.getIntValue() : null;
    }

    public void setOrderStateValue(Integer v){
        if(v != null)
            orderState = OrderState.getByIntValue(v);
    }
}
